Skip to content

chore: visual updates#174

Merged
hmbanan666 merged 1 commit into
mainfrom
chore
Sep 19, 2025
Merged

chore: visual updates#174
hmbanan666 merged 1 commit into
mainfrom
chore

Conversation

@hmbanan666
Copy link
Copy Markdown
Collaborator

@hmbanan666 hmbanan666 commented Sep 19, 2025

Summary by CodeRabbit

  • New Features

    • Ticket details: Added an edit button in the header.
    • Drawer: Added a “Написать сообщение” button.
  • Style

    • Drawer visuals: Softer ring opacity.
    • ActiveCard: Now accepts custom CSS classes.
    • Message File: Redesigned card; updated labels to “Загружено …”.
    • Message Image: Added press animation.
    • Message Text: Adjusted width to fit content with a minimum two-thirds width.
    • Tasks: Avatar now has a primary border; removed pointer cursor on links.
    • Ticket List: Introduced a titled, grouped layout.
    • “Show more” button: Updated to solid secondary with wider padding.

@hmbanan666 hmbanan666 self-assigned this Sep 19, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Sep 19, 2025

Walkthrough

UI-focused updates across Telegram app: configuration tweak to Drawer ring class; ActiveCard component gains optional class prop; styling/layout adjustments in message components; ticket pages reorganized (new edit handler; Drawer content restructured; list gains header); minor style changes on tasks page and image press effect.

Changes

Cohort / File(s) Summary
UI config tweak
apps/atrium-telegram/app/app.config.ts
Drawer content class updated from ring-default to ring-default/50 within ui.drawer.slots.content; no API changes.
ActiveCard component & usages
apps/atrium-telegram/app/components/ActiveCard.vue, apps/atrium-telegram/app/components/ticket/MessageText.vue, apps/atrium-telegram/app/components/ticket/MessageFile.vue
ActiveCard adds optional class?: string prop and binds to root. MessageText uses ActiveCard with class="!w-fit min-w-2/3". MessageFile replaces bordered container with ActiveCard and restructures markup; updates file label strings.
Ticket pages updates
apps/atrium-telegram/app/pages/ticket/index.vue, apps/atrium-telegram/app/pages/ticket/[ticketId]/index.vue
Ticket list wrapped in vertical layout with header. Ticket detail adds pencil button with handleEdit() (calls vibrate()), reworks Drawer slots (default slot button added; form remains in body), and updates “Show more” button styling.
Styling adjustments
apps/atrium-telegram/app/components/ticket/MessageImage.vue, apps/atrium-telegram/app/pages/tasks/index.vue
Image gets active:scale-95 duration-200. Tasks: avatar gains border-2 border-primary; cursor-pointer removed from avatar and “today” link.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant TicketPage as Ticket Detail Page
  participant Haptics as vibrate()

  User->>TicketPage: Click pencil (Edit)
  activate TicketPage
  TicketPage->>Haptics: handleEdit()
  deactivate TicketPage
  note right of Haptics: Triggers haptic feedback
Loading
sequenceDiagram
  autonumber
  actor User
  participant Drawer as Drawer (Ticket Detail)
  participant Form as FormCreateTicketMessage

  User->>Drawer: Click "Написать сообщение" (default slot button)
  note right of Drawer: Default slot button present in Drawer header area
  Drawer->>Form: Show body with FormCreateTicketMessage
  User->>Form: Submit / interact (unchanged bindings)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

A nibble of code, a tap to edit,
Soft rings shimmer—UI committed.
Cards now flex with classes neat,
Tickets march in tidy beat.
I thump my paw—vibrate!—hooray,
Another polished hopping day. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "chore: visual updates" accurately indicates this PR contains UI-only changes and aligns with the changeset which mainly adjusts styling, classes, and text across message components, ActiveCard, Drawer, and ticket/task pages, so it is related to the main change. It is broad but still informative enough for a quick scan of the repo history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

@hmbanan666 hmbanan666 merged commit 5af0b55 into main Sep 19, 2025
7 of 8 checks passed
@hmbanan666 hmbanan666 deleted the chore branch September 19, 2025 14:13
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/atrium-telegram/app/pages/ticket/[ticketId]/index.vue (1)

98-102: Bug: shows first N messages, not the last N as comment states.

Use negative slice to take from the end.

Apply:

-const messages = computed(() => ticket.value?.messages.slice(0, shownMessages.value))
+const messages = computed(() => ticket.value?.messages.slice(-shownMessages.value))
🧹 Nitpick comments (8)
apps/atrium-telegram/app/pages/tasks/index.vue (2)

6-8: Avatar remains clickable but lost affordance; add pointer and ARIA.

Without cursor-pointer, the tap target looks inert. Also add an accessible name since it triggers an action.

Apply:

-        class="size-14 border-2 border-primary hover:scale-95 active:scale-90 duration-200"
+        class="size-14 border-2 border-primary hover:scale-95 active:scale-90 duration-200 cursor-pointer"
+        role="button"
+        aria-label="Изменить аватар"

17-24: ULink rendered as button: confirm pointer cursor.

as="button" may not get a pointer cursor depending on resets. If not, add cursor-pointer to keep affordance.

apps/atrium-telegram/app/components/ticket/MessageImage.vue (1)

3-7: Add lazy-loading and meaningful alt text.

Improves performance and a11y for content images.

Apply:

-    <img
+    <img
       :src="message.fileUrl"
-      alt=""
-      class="w-full h-full object-contain rounded-lg active:scale-95 duration-200"
+      alt="Изображение"
+      loading="lazy"
+      decoding="async"
+      class="w-full h-full object-contain rounded-lg active:scale-95 duration-200"
     >
apps/atrium-telegram/app/components/ticket/MessageText.vue (1)

2-2: Likely width mix-up: use max-w, not min-w.

!w-fit min-w-2/3 forces bubbles to be at least 2/3 width. Chats usually cap max width.

Apply:

-  <ActiveCard class="!w-fit min-w-2/3">
+  <ActiveCard class="!w-fit max-w-2/3">
apps/atrium-telegram/app/components/ActiveCard.vue (1)

2-3: Explicit type="button" to avoid accidental form submits.

Safe default when this button appears inside forms.

Apply (already included in diff above).

apps/atrium-telegram/app/pages/ticket/index.vue (1)

4-6: Consider i18n for the new header.

Wrap in $t(...) to keep localization consistent across the app.

Example:

-      <div class="text-2xl/6 font-bold tracking-tight">
-        Активные тикеты
-      </div>
+      <div class="text-2xl/6 font-bold tracking-tight" v-text="$t('ticket.active-tickets')" />
apps/atrium-telegram/app/components/ticket/MessageFile.vue (1)

48-51: Typo in Russian: “файл” uses a combining mark; use “файл”.

Prevents search/matching issues.

Apply:

-        label: 'Загружен файл',
+        label: 'Загружен файл',
apps/atrium-telegram/app/pages/ticket/[ticketId]/index.vue (1)

7-13: Icon-only button needs an accessible name.

Add aria-label (and optional title) for screen readers.

Apply:

         <UButton
           variant="soft"
           color="primary"
           size="xl"
           icon="i-lucide-pencil"
+          aria-label="Редактировать"
+          title="Редактировать"
           @click="handleEdit()"
         />
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e52e382 and 4429c91.

📒 Files selected for processing (8)
  • apps/atrium-telegram/app/app.config.ts (1 hunks)
  • apps/atrium-telegram/app/components/ActiveCard.vue (1 hunks)
  • apps/atrium-telegram/app/components/ticket/MessageFile.vue (2 hunks)
  • apps/atrium-telegram/app/components/ticket/MessageImage.vue (1 hunks)
  • apps/atrium-telegram/app/components/ticket/MessageText.vue (1 hunks)
  • apps/atrium-telegram/app/pages/tasks/index.vue (2 hunks)
  • apps/atrium-telegram/app/pages/ticket/[ticketId]/index.vue (4 hunks)
  • apps/atrium-telegram/app/pages/ticket/index.vue (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (1)
apps/atrium-telegram/app/app.config.ts (1)

63-64: Verify ring-default/50 compiles — confirm default is a Tailwind color token.

I couldn't find any tailwind.config.* in the repo to confirm a theme color named default (packages/ui/app/app.config.ts defines colors but not default). Occurrences to check: apps/atrium-telegram/app/app.config.ts:63 (content: '!max-h-10/12 ring-default/50 hide-scroll') and apps/web-app/app/components/ActiveCard.vue:3 (class includes 'ring-default/50'). If default is not a theme color, the /50 will be dropped — either define theme.colors.default, remove the /50, or use an explicit opacity approach (e.g., ring-default + ring-opacity-50 or an arbitrary color with /50).

Comment on lines +2 to +6
<button
class="relative w-full active:scale-95 duration-200 text-left cursor-pointer outline-0"
:class="props.class"
@click="vibrate()"
>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Don’t declare class as a prop; rely on Vue’s native class merging.

class is special in Vue and auto‑merges to the root; declaring it as a prop is unnecessary and can cause surprises. Drop the prop and binding.

Apply:

-  <button
-    class="relative w-full active:scale-95 duration-200 text-left cursor-pointer outline-0"
-    :class="props.class"
-    @click="vibrate()"
-  >
+  <button
+    class="relative w-full active:scale-95 duration-200 text-left cursor-pointer outline-0"
+    type="button"
+    @click="vibrate()"
+  >

And:

-const props = defineProps<{ class?: string }>()
-
 const { vibrate } = useFeedback()
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<button
class="relative w-full active:scale-95 duration-200 text-left cursor-pointer outline-0"
:class="props.class"
@click="vibrate()"
>
const { vibrate } = useFeedback()
<button
class="relative w-full active:scale-95 duration-200 text-left cursor-pointer outline-0"
type="button"
@click="vibrate()"
>
🤖 Prompt for AI Agents
In apps/atrium-telegram/app/components/ActiveCard.vue around lines 2–6, the
template declares and binds a `class` prop (":class=\"props.class\"") which is
unnecessary because Vue automatically merges classes on the root element; remove
the `class` prop declaration from the component props and delete the
`:class="props.class"` binding in the template so parent classes merge natively;
if the component needs to forward other attributes, ensure it uses
v-bind="$attrs" (or enable inheritAttrs) so other attributes still pass through.

Comment on lines +3 to +17
<ActiveCard>
<div class="w-full relative flex flex-col justify-between gap-2">
<div class="p-2 w-16 h-10 flex flex-row items-center justify-center bg-primary rounded-md">
<UIcon :name="getFileData(message.fileType).icon" class="size-6 tg-text-button" />
</div>

<UButton
variant="soft"
color="secondary"
:label="getFileData(message.fileType).label"
/>
</div>
<div v-if="message?.createdAt" class="flex justify-end text-xs text-muted">
{{ format(new Date(message.createdAt), 'dd MMMM в HH:mm', { locale: ru }) }}
</div>
<div class="text-base/5 whitespace-break-spaces text-default font-medium">
{{ getFileData(message.fileType).label }}
</div>

<div v-if="message?.createdAt" class="flex justify-end text-xs text-muted">
{{ format(new Date(message.createdAt), 'dd MMMM в HH:mm', { locale: ru }) }}
</div>
</div>
</ActiveCard>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

No way to open/download the attachment after removing the button.

Add a click handler (or link) to open message.fileUrl; keep vibrate via ActiveCard.

Apply:

-    <ActiveCard>
+    <ActiveCard
+      @click="handleOpenAttachment"
+      :aria-label="getFileData(message.fileType).label"
+    >

Add handler:

 ]>()
 
 function getFileData(type: TicketMessage['fileType']) {
   switch (type) {
@@
   }
 }
+
+function handleOpenAttachment() {
+  if (message?.fileUrl) {
+    window.open(message.fileUrl, '_blank', 'noopener,noreferrer')
+  }
+}
🤖 Prompt for AI Agents
In apps/atrium-telegram/app/components/ticket/MessageFile.vue around lines 3-17,
the attachment UI no longer offers any way to open or download the file after
the button was removed; add an interactive handler on the card (or wrap the file
area in an anchor) that opens message.fileUrl. Implement by wiring a click
handler on the ActiveCard container (or using an <a> with target="_blank"
rel="noopener noreferrer" and download when appropriate) that opens
message.fileUrl in a new tab; keep the existing ActiveCard vibrate behavior and
ensure the click is accessible (cursor pointer, aria-label) and guards against
missing URL before opening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant